package com.design.blog.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.design.blog.model.Article;
import com.design.blog.model.vo.ArticleVO;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @version 1.0
 * @author hxg
 * @date 2022-02-28
 * Mapper接口
 */
public interface ArticleMapper extends BaseMapper<Article> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param article
	 * @return
	 */
	List<Article> selectArticlePage(IPage page, ArticleVO article);

    Article selectAllById(Long id);

    @Update("update article set category_id = #{type} where id =#{id}")
    int chgCategory(String id, String type);
}
